import React, { useEffect, useRef } from 'react';
import Highcharts from 'highcharts';
import HighchartsReact from 'highcharts-react-official';
// import HighchartsTree from 'highcharts/modules/treegraph';
// import HighchartsExporting from 'highcharts/modules/exporting';
// import HighchartsAccessibility from 'highcharts/modules/accessibility';

import TreeMapModule from "highcharts/modules/treemap";
import TreeGraphModule from "highcharts/modules/treegraph";

// 初始化treemap模块
// HighchartsTree(Highcharts);
// HighchartsExporting(Highcharts);
// HighchartsAccessibility(Highcharts);

TreeMapModule(Highcharts);
TreeGraphModule(Highcharts);

const options = {
  chart: {
    spacingBottom: 30,
    marginRight: 120,
    height: '1950',
    width:1000,
    style: {
      fontSize: '1em'
  },
  },
  title: {
    text: '全球数据中心'
  },
  series: [
    {
      type: 'treegraph',
      keys: ['parent', 'id', 'level'],
      clip: false,
      data: [
        [undefined, '全球'],
        ['全球', '亚洲'],
        ['亚洲', '中国'],
        ['中国', '香港'],
        ['香港', 'MEGA-i HK',6],
        ['香港', 'Equinix HK1',6],
        ['香港', 'Equinix HK2',6],
        ['香港', 'Equinix HK3',6],
        ['香港', 'Equinix HK5',6],
        ['香港', 'GDS HK1',6],
        ['香港', 'GDS HK2',6],
        ['香港', 'Anchnet Tai Po',6],
        ['香港', 'GDS HK3',6],
        ['香港', 'Equinix HK1 (Global Gateway)',6],
        ['香港', 'MEGA-i iAdvantage Data Center',6],
        ['香港', 'HKIX1B',6],
        ['香港', 'Telehouse HK Cloud Computing Complex (HKColo)',6],
        ['香港', 'APT Satellite Data Centre',6],
        ['香港', 'Equinix HK3',6],
        ['香港', 'Telekom Malaysia Berhad HK1',6],
        ['香港', 'Ucloud',6],
        ['香港', 'HKIX2',6],
        ['香港', 'China Unicom Data Centre',6],
        ['香港', 'Citic Data Centre',6],
        ['香港', 'Digital Savvis (Edge)',6],
        ['香港', 'Global Center (China Unicom)',6],
        ['香港', 'Global Network Centre (China Mobile International)',6],
        ['香港', 'Global Switch',6],
        ['香港', 'HKIX 1',6],
        ['香港', 'HKIX 1B',6],
        ['香港', 'NTT Data Centre',6],
        ['香港', 'Hong Kong Exchange',6],
        ['香港', 'TGT HK Data Centre 2',6],
        ['香港', 'iTech Tower',6],
        ['香港', 'iTech Tower 2',6],
        ['香港', 'Mega Plus',6],
        ['香港', 'Mita Centre',6],
        ['香港', 'NTT Tai Po Data Centre',6],
        ['香港', 'NTT TKO Data Centre - Tower 1',6],
        ['香港', 'NTT TKO Data Centre - Tower 2',6],
        ['香港', 'One Asia Data Centre (Legan Center)',6],
        ['香港', 'MEGA Two',6],
        ['香港', 'Sino Favour Centre',6],
        ['香港', 'Telecom House',6],
        ['香港', 'HKCOLO Data Centre',6],
        ['香港', 'ANC Submarine Cable Station 1',6],
        ['香港', 'ANC Submarine Cable Station 2',6],
        ['香港', 'APT Satellite Data Centre',6],
        ['香港', 'Equinix HK3 (AsiaTone i-Center)',6],
        ['香港', 'Billion Center (Telekom Malaysia Berhad HK1)',6],
        ['香港', 'Cheung Wing Industrial Building (UCloud) ',6],
        ['香港', 'Citic Telecom Tower (HKIX2)',6],
        ['香港', 'SingTel Data Center',6],
        ['香港', 'CITIC Telecom CPC',6],
        ['香港', 'Century Link HKDC',6],
        ['香港', 'Global Center (China Unicom)',6],
        ['香港', 'China Mobile Global Network Center (GNC) Data Center',6],
        ['香港', 'Global Switch',6],
        ['香港', 'HKIX1',6],
        ['香港', 'Ever Gain Plaza Tower 2',6],
        ['香港', 'Hong Kong Exchange',6],
        ['香港', 'TGT HK Data Centre 2 (IAC)',6],
        ['香港', 'iTech Tower',6],
        ['香港', 'iTech Tower 2',6],
        ['香港', 'Equinix HK2 (Kerry Godown)',6],
        ['香港', 'MEGA Plus',6],
        ['香港', 'Equinix HK5 (Mega Plus - Tower 2)',6],
        ['香港', 'NTT Tai Po Data Centre ',6],
        ['香港', 'China Mobile HK MITA Kwai Chung',6],
        ['香港', 'NTT TKO Data Centre - Tower 1',6],
        ['香港', 'NTT TKO Data Centre - Tower 2',6],
        ['香港', 'One Asia Data Centre (Legan Center)',6],
        ['香港', 'MEGA Two',6],
        ['香港', 'HKCOLO Data Center',6],
        ['香港', 'Telecom House',6],
        ['香港', 'Telstra Hong Kong Cloud Space 1',6],
        ['香港', 'Telstra Hong Kong Cloud Space 2',6],
        ['香港', 'TraxComm',6],
        ['香港', 'ANC Submarine Cable Station 1',6],
        ['香港', 'ANC Submarine Cable Station 2',6],
        ['香港', 'APT Satellite Data Centre ',6],
        ['香港', 'Equinix HK3 (AsiaTone i-Center)',6],
        ['香港', 'Billion Center (Telekom Malaysia Berhad HK1)',6],
        ['香港', 'Cheung Wing Industrial Building (UCloud) ',6],
        ['香港', 'Citic Telecom Tower (HKIX2)',6],
        ['香港', 'Corporation Park',6],
        ['香港', 'Digital Savvis',6],
        ['香港', 'DCH Motor Service Building',6],
        ['香港', 'Ever Gain Plaza Tower 2',6],
        ['香港', 'Global Center (China Unicom) ',6],
        ['香港', 'Global Network Centre (China Mobile International)',6],
        ['香港', 'Global Switch ',6],
        ['香港', 'HKIX1',6],
        ['香港', 'HKIX1B',6],
        ['香港', 'Hong Kong Exchange ',6],
        ['香港', 'TGT HK Data Centre 2 (IAC)',6],
        ['香港', 'iTech Tower ',6],
        ['香港', 'iTech Tower 2 ',6],
        ['香港', 'Equinix HK2 (Kerry Godown)',6],
        ['香港', 'Mega Plus ',6],
        ['香港', 'Equinix HK5 (Mega Plus - Tower 2)',6],
        ['香港', 'Mita Centre ',6],
        ['香港', 'NTT Tai Po Data Centre ',6],
        ['香港', 'NTT TKO Data Centre - Tower 1 ',6],
        ['香港', 'NTT TKO Data Centre - Tower 2 ',6],
        ['香港', 'One Asia Data Centre (Legan Center) ',6],
        ['香港', 'SHK Logistics Centre (Mega Two)',6],
        ['香港', 'Sino Favour Centre ',6],
        ['香港', 'Telecom House ',6],
        ['香港', 'Telehouse HK Cloud Computing Complex (HKColo) ',6],
        ['香港', 'MEGA-i iAdvantage (China)',6],
        ['香港', 'Tseung kwan O Data Center',6],
        ['香港', 'HGC Test Node 1',6],
        ['香港', 'HGC Test Node 2',6],
        ['香港', 'China Mobile Global Network Center (GNC) Data Center',6],
        ['香港', 'Equinix HK1',6],
        ['香港', 'MEGAi 12/F (Telstra MIHK)',6],
        ['香港', 'MEGA iAdvantage 32/F MEGATOP',6],
        ['香港', 'MEGA-i iAdvantage (Global)',6],
        ['香港', 'China Mobile Global Network Center (GNC) Data Center',6],
        ['香港', '21vianet Hong Kong Data Centre',6],
        ['香港', 'Hong Kong EdgeX',6],
        ['香港', 'Test-Node-01',6],
        ['香港', 'GDS HK1',6],
        ['香港', 'GDS HK2',6],
        ['香港', '21vianet Global Gateway Hong Kong.',6],
        ['香港', 'HK-CMI-VTEP1',6],
        ['香港', '21vianet Mega-iAdvantage, Hong Kong',6],
        ['香港', 'Hong Kong Cavendish Center',6],
        ['香港', 'Hong Kong Watson Center',6],
        ['香港', 'MEGA-i',6],
        ['香港', 'Equinix HK1',6],
        ['香港', 'Sino Favour Centre',6],
        ['香港', 'Hong Kong BDX',6],
        ['香港', 'Hong Kong BDX',6],
        ['香港', 'Hong Kong Cavendish Center',6],
        ['香港', 'Hong Kong Watson Center',6],
        ['香港', 'Hong Kong Mega-I',6],
        ['香港', 'Hong Kong Global Gateway',6],
        ['香港', 'Hong Kong Sino Favour Centre',6],
        ['香港', 'Hong Kong EdgeX',6],
        ['香港', 'test16jun1',6],
        ['香港', 'CLOUD COMPUTING COMPLEX',6],
        ['香港', 'test2',6],
        ['香港', 'NTT Tai Po Data Centre',6],
        ['香港', 'MEGA-i iAdvantage Data Center',6],
        ['中国', '深圳'],
        ['深圳', 'Shenzhen Futian',6],
        ['深圳', 'National Supercomputing center',6],
        ['深圳', 'Humeng Technology',6],
        ['深圳', 'GDS Futian  data center',6],
        ['深圳', '21ViaNet Software Industry Base',6],
        ['深圳', 'China Unicom science park',6],
        ['深圳', 'Baidu mansion',6],
        ['深圳', 'Tencent Binhai',6],
        ['深圳', 'Tencent Building',6],
        ['深圳', '21ViaNet Shenzhen Garden City',6],
        ['深圳', 'Xialong Futian',6],
        ['深圳', 'China Telecom Yantian',6],
        ['深圳', 'LinkChina Baisha',6],
        ['深圳', 'Yuhua',6],
        ['深圳', 'ESIN Baiwangxin',6],
        ['深圳', 'Changcheng Building',6],
        ['深圳', 'Shenyang',6],
        ['深圳', 'Shenzhen',6],
        ['深圳', 'Youchi Shenzhen Honggang',6],
        ['深圳', 'National Supercomputing center',6],
        ['深圳', 'Humeng Global',6],
        ['深圳', 'Efly Yuhua',6],
        ['深圳', 'China Telecom Meisheng',6],
        ['深圳', 'Runxun BanTian',6],
        ['深圳', 'GDS SZ3',6],
        ['深圳', 'GDS SZ1',6],
        ['深圳', 'GDS SZ2',6],
        ['深圳', 'GDS SZ4',6],
        ['深圳', 'Gaoxin Wang IDC',6],
        ['深圳', '21Vianet Software Park',6],
        ['深圳', 'Humeng KeYuan',6],
        ['深圳', 'Hua Fen IDC',6],
        ['深圳', 'Song Yuan',6],
        ['深圳', 'Mingkeda IDC',6],
        ['深圳', 'Anchnet Shenzhen',6],
        ['深圳', 'GuoLi Shenzhen',6],
        ['深圳', 'DR.PENG Shenzhen',6],
        ['深圳', 'Shenzhen Dr. Peng',6],
        ['深圳', 'PBS- Shenzhen -POP1',6],
        ['深圳', 'PBS- Shenzhen -POP2',6],
        ['深圳', '夏龙机房',6],
        ['深圳', '互盟机房',6],
        ['深圳', '中信机房',6],
        ['深圳', '宝德机房',6],
        ['深圳', '奥飞机房',6],
        ['深圳', 'Shenzhen Huafeng',6],
        ['深圳', 'Dr-Peng_ShenZhen',6],
        ['深圳', 'China Telecom Meisheng',6],
        ['深圳', 'Efly Yuhua',6],
        ['深圳', 'Gaoxin Wang IDC',6],
        ['深圳', 'GDS SH4',6],
        ['深圳', 'GDS-SZ1',6],
        ['深圳', 'GDS SZ2',6],
        ['深圳', 'GDS SZ4',6],
        ['深圳', 'Hua Fen IDC',6],
        ['深圳', 'HUMENG-SZXC02',6],
        ['深圳', 'Humeng KeYuan',6],
        ['深圳', 'NSCC-SZXC01',6],
        ['深圳', 'Runxun BanTian',6],
        ['深圳', 'DCC-SZXC20',6],
        ['深圳', 'GDS-SZ3',6],
        ['深圳', 'Shenzhen Huafeng',6],
        ['深圳', 'Song Yuan',6],
        ['深圳', 'Shenzhen Honggang building',6],
        ['深圳', 'GDS-SZ3',6],
        ['深圳', 'GDS-SZ1',6],
        ['深圳', 'GDS-SZ3',6],
        ['深圳', 'GDS SZ4',6],
        ['深圳', 'GDS SZ5',6],
        ['深圳', 'GDS-SZ6',6],
        ['深圳', 'GDS SZ-GL',6],
        ['深圳', 'SZ3-NFV_TOR',6],
        ['深圳', 'Shenzhen Zhongshen IDC',6],
        ['深圳', 'Shenzhen Xinbaohui IDC',6],
        ['深圳', 'Shenzhen Software Base',6],
        ['深圳', 'Shenzhen Huayuancheng IDC',6],
        ['深圳', 'Shenzhen Gongming',6],
        ['深圳', 'Shenzhen',6],
        ['深圳', 'Shenyang',6],
        ['深圳', 'ShenZhen-AliCloud',6],
        ['深圳', 'ShenZhen-Ali-Financial-Cloud',6],
        ['深圳', '21vianet ShenYang 沈北IDC',6],
        ['深圳', '21vianet Shenzhen CDT IDC',6],
        ['深圳', '21vianet Shenzhen souidc',6],
        ['深圳', 'SZ',6],
        ['深圳', '21vianet Shenzhen Garden City',6],
        ['深圳', 'Longgang, Shenzhen',6],
        ['深圳', '21vianet Shenzhen Software Base',6],
        ['深圳', '21vianet Shenzhen Xinbaohui',6],
        ['深圳', '21vianet Shenzhen medium and deep',6],
        ['深圳', '21vianet Shenzhen Honggang Road Yingtong',6],
        ['深圳', '21vianet Shenzhen Gongming',6],
        ['深圳', '深圳宝安',6],
        ['深圳', '英文名称',6],
        ['深圳', '南通 DC1',6],
        ['深圳', 'SQ1',6],
        ['中国', '上海'],
        ['上海', 'GDS SH1GDS SH1',6],
        ['上海', 'Youchi Shanghai TianlinYouchi Shanghai Tianlin',6],
        ['上海', 'Shuxun LanguangShuxun Languang',6],
        ['上海', 'GDS Waigaoqiao data centerGDS Waigaoqiao data center',6],
        ['上海', 'ALLINFNT Data CenterALLINFNT Data Center',6],
        ['上海', 'Shuxun JinqiaoShuxun Jinqiao',6],
        ['上海', 'Dr.Peng ShujugangDr.Peng Shujugang',6],
        ['上海', 'China Telecom Cloud CubeChina Telecom Cloud Cube',6],
        ['上海', 'Shujugang China Telecom MicrosoftShujugang China Telecom Microsoft',6],
        ['上海', 'Yovole GuodingYovole Guoding',6],
        ['上海', 'China Telecom KangshenChina Telecom Kangshen',6],
        ['上海', '21ViaNet Jiyun21ViaNet Jiyun',6],
        ['上海', 'Zhong Xin Nan Jing XiZhong Xin Nan Jing Xi',6],
        ['上海', 'ShanghaiShanghai',6],
        ['上海', 'Equinix SH2Equinix SH2',6],
        ['上海', 'Equinix SH5Equinix SH5',6],
        ['上海', 'Shanghai YinhaiShanghai Yinhai',6],
        ['上海', 'Equinix SH5Equinix SH5',6],
        ['上海', 'Equinix SH6Equinix SH6',6],
        ['上海', 'GDS SH2GDS SH2',6],
        ['上海', 'GDS SH3GDS SH3',6],
        ['上海', 'GDS SH4GDS SH4',6],
        ['上海', 'GDS Tang ZhenGDS Tang Zhen',6],
        ['上海', 'GDS Heng XuGDS Heng Xu',6],
        ['上海', 'HengLian ShanghaiHengLian Shanghai',6],
        ['上海', 'Kejiwang ShanghaiKejiwang Shanghai',6],
        ['上海', 'Kejiwang Caohe Kejiwang Caohe ',6],
        ['上海', 'ShuXun GuoshoujingShuXun Guoshoujing',6],
        ['上海', 'ShuXun QinQiaoShuXun QinQiao',6],
        ['上海', '21Vianet Jiyun21Vianet Jiyun',6],
        ['上海', 'Yunlifang ShiBeiYunlifang ShiBei',6],
        ['上海', '219 IDC219 IDC',6],
        ['上海', 'QuanhuaQuanhua',6],
        ['上海', 'Youfou DingguoYoufou Dingguo',6],
        ['上海', 'PuRuan IDCPuRuan IDC',6],
        ['上海', '唯一唯一康沈机房康沈机房',6],
        ['上海', '中信中信网络机房网络机房',6],
        ['上海', 'Lan Xin Tian LinLan Xin Tian Lin',6],
        ['上海', 'Youchi Shanghai Tian Lin 418Youchi Shanghai Tian Lin 418',6],
        ['上海', 'Jiaoyu Wang Hua Shan LuJiaoyu Wang Hua Shan Lu',6],
        ['上海', 'Jiaoyu Wang Xian XiaJiaoyu Wang Xian Xia',6],
        ['上海', 'OneAsia Ri JingOneAsia Ri Jing',6],
        ['上海', 'GDS No.1GDS No.1',6],
        ['上海', 'GDS No.2GDS No.2',6],
        ['上海', 'GDS No.3GDS No.3',6],
        ['上海', 'GDS No.5GDS No.5',6],
        ['上海', 'Guoli ShanghaiGuoli Shanghai',6],
        ['上海', 'Anchnet ShanghaiAnchnet Shanghai',6],
        ['上海', 'SDS01SDS01',6],
        ['上海', 'SDS03SDS03',6],
        ['上海', 'SDS02SDS02',6],
        ['上海', 'GuoLi ShangHaiGuoLi ShangHai',6],
        ['上海', 'DR.PENG ShanghaiDR.PENG Shanghai',6],
        ['上海', 'PBS -Shanghai -POPPBS -Shanghai -POP',6],
        ['上海', 'Shanghai Dr Peng POPShanghai Dr Peng POP',6],
        ['上海', '上海数捤¸海数据港股份有限公司®港股份有限公司',6],
        ['上海', '上海两¸海万国数据中心国数据中心',6],
        ['上海', '世礸纪互联ºª互联',6],
        ['上海', '云云立方立方',6],
        ['上海', '斜土視土路腾讯机房·¯腾讯机房',6],
        ['上海', '蕴川公路蕴川公路777号宝信2期777号宝信2期',6],
        ['上海', '中䤸­信泰富¿¡泰富',6],
        ['上海', '腾讯大娅¾讯大厦UCloud¦UCloud',6],
        ['上海', '鹏卩¹博士机房士机房',6],
        ['上海', '宝䥮信机房¿¡机房',6],
        ['上海', '云云立方立方',6],
        ['上海', '入环环',6],
        ['上海', 'Shanghai Tencent BuildingShanghai Tencent Building',6],
        ['上海', 'Xietu Road TencentXietu Road Tencent',6],
        ['上海', 'Dongfang NetDongfang Net',6],
        ['上海', 'Changkefa Qibao DCChangkefa Qibao DC',6],
        ['上海', 'Shanghai YinhaiShanghai Yinhai',6],
        ['上海', 'Dr-Peng_ShangHaiDr-Peng_ShangHai',6],
        ['上海', 'YUNZX-SHAC03YUNZX-SHAC03',6],
        ['上海', 'Equinix-SH2Equinix-SH2',6],
        ['上海', 'Equinix-SH6Equinix-SH6',6],
        ['上海', '21ViaNet Jiyun21ViaNet Jiyun',6],
        ['上海', 'ATHUB-SHAC05ATHUB-SHAC05',6],
        ['上海', 'Equinix-SH5Equinix-SH5',6],
        ['上海', 'GDS Heng XuGDS Heng Xu',6],
        ['上海', 'GDS-SH1GDS-SH1',6],
        ['上海', 'GDS SH2GDS SH2',6],
        ['上海', 'GDS SH3GDS SH3',6],
        ['上海', 'GDS Tang ZhenGDS Tang Zhen',6],
        ['上海', 'Kejiwang Caohe Kejiwang Caohe ',6],
        ['上海', 'Kejiwang ShanghaiKejiwang Shanghai',6],
        ['上海', 'Lan Xin Tian LinLan Xin Tian Lin',6],
        ['上海', 'OneAsia Ri JingOneAsia Ri Jing',6],
        ['上海', 'QuanhuaQuanhua',6],
        ['上海', 'Shanghai YinhaiShanghai Yinhai',6],
        ['上海', 'Shujugang China Telecom MicrosoftShujugang China Telecom Microsoft',6],
        ['上海', 'ShuXun GuoshoujingShuXun Guoshoujing',6],
        ['上海', 'Shuxun JinqiaoShuxun Jinqiao',6],
        ['上海', 'Equinix-SH1Equinix-SH1',6],
        ['上海', 'Shanghai TianlinShanghai Tianlin',6],
        ['上海', 'Yovole GuodingYovole Guoding',6],
        ['上海', 'Zhong Xin Nan Jing XiZhong Xin Nan Jing Xi',6],
        ['上海', '21vianet ShangHai GDS21vianet ShangHai GDS',6],
        ['上海', 'POC POPPOC POP',6],
        ['上海', 'SH-POC-POPSH-POC-POP',6],
        ['上海', 'ShiBei XinZhongXin DaShaShiBei XinZhongXin DaSha',6],
        ['上海', 'HaiShangHai XinChengHaiShangHai XinCheng',6],
        ['上海', 'LvDiHuiChuang GuoJiGuangChangLvDiHuiChuang GuoJiGuangChang',6],
        ['上海', 'PuJiangGuoJiPuJiangGuoJi',6],
        ['上海', 'GDS-SH4GDS-SH4',6],
        ['上海', 'GDS SH4GDS SH4',6],
        ['上海', 'GDS-SH5GDS-SH5',6],
        ['上海', 'GDS-SH6GDS-SH6',6],
        ['上海', 'GDS-SH8GDS-SH8',6],
        ['上海', 'GDS SH9GDS SH9',6],
        ['上海', 'GDS SH11GDS SH11',6],
        ['上海', 'GDS-SH13GDS-SH13',6],
        ['上海', 'GDS SH14 Phase 2GDS SH14 Phase 2',6],
        ['上海', 'GDS SH18 Phase 3GDS SH18 Phase 3',6],
        ['上海', 'SH-POC-VTEP100SH-POC-VTEP100',6],
        ['上海', 'SH-POC-VTEP101SH-POC-VTEP101',6],
        ['上海', 'SH-POC-VTEP102SH-POC-VTEP102',6],
        ['上海', 'SH-POC-VTEP103SH-POC-VTEP103',6],
        ['上海', 'SH-CMISH-CMI',6],
        ['上海', 'SH-CMI-VTEP1SH-CMI-VTEP1',6],
        ['上海', 'SH2-NFV_TORSH2-NFV_TOR',6],
        ['上海', '21vnSH00121vnSH001',6],
        ['上海', '21vnSH00221vnSH002',6],
        ['上海', '21vnSH00421vnSH004',6],
        ['上海', '21vnSH00521vnSH005',6],
        ['上海', '21vnSH00621vnSH006',6],
        ['上海', '21vnSH00721vnSH007',6],
        ['上海', 'Shanghai Songjiang IDCShanghai Songjiang IDC',6],
        ['上海', 'ShanghaiShanghai',6],
        ['上海', 'GDS-SH1GDS-SH1',6],
        ['上海', 'GDS-SH2GDS-SH2',6],
        ['上海', 'GDS-SH3GDS-SH3',6],
        ['上海', 'GDS-SH16GDS-SH16',6],
        ['上海', 'ShangHai-AliCloudShangHai-AliCloud',6],
        ['上海', 'ShangHai-Ali-Financial-CloudShangHai-Ali-Financial-Cloud',6],
        ['上海', 'ShangHai-AzureShangHai-Azure',6],
        ['上海', 'ShangHai-HuaweiCloudShangHai-HuaweiCloud',6],
        ['上海', 'SHASHA',6],
        ['上海', '21vianet Shanghai Hogan21vianet Shanghai Hogan',6],
        ['上海', '21vianet Shanghai Equnix21vianet Shanghai Equnix',6],
        ['上海', '21vianet Tianzhou Road, Shanghai21vianet Tianzhou Road, Shanghai',6],
        ['上海', '21vianet Shanghai He Dan21vianet Shanghai He Dan',6],
        ['上海', '21vianet Shanghai Ji Yun21vianet Shanghai Ji Yun',6],
        ['上海', '21vianet Jingan, Shanghai',6],
        ['上海', '21vianet Songjiang, Shanghai21vianet Songjiang, Shanghai',6],
        ['上海', '21vianet Shanghai Tianlin Road Yingtong21vianet Shanghai Tianlin Road Yingtong',6],
        ['上海', '21vianet Tianzhou Road, Shanghai21vianet Tianzhou Road, Shanghai',6],
        ['上海', '21vianet Shanghai Waigaoqiao21vianet Shanghai Waigaoqiao',6],
        ['上海', '21vianet Shanghai slope dirt road21vianet Shanghai slope dirt road',6],
        ['上海', '21vianet Shanghai Citic21vianet Shanghai Citic',6],
        ['上海', 'Shanghai WaigaoqiaoShanghai Waigaoqiao',6],
        ['中国', '长沙'],
        ['长沙', 'PBS -Changsha -POP',6],
        ['长沙', '21vnCS001',6],
        ['长沙', 'Changsha',6],
        ['长沙', '21vianet Changsha 软件大楼',6],
        ['长沙', 'CS',6],
        ['长沙', '21vianet Changsha Yingtong',6],
        ['长沙', '21vianet Changsha Citic',6],
        ['中国', '北京'],
        ['亚洲', '新加坡'],
        ['新加坡', '新加坡市',6],
        ['亚洲', '新加坡'],
        ['新加坡', '新加坡市',6],
      ],
      marker: {
        symbol: 'circle',
        radius: 6,
        fillColor: '#ffffff',
        lineWidth: 3
      },
      dataLabels: {
        align: 'left',
        pointFormat: '{point.id}',
        style: {
          color: '#000000',
          textOutline: '3px #ffffff',
          whiteSpace: 'nowrap'
        },
        x: 24,
        crop: false,
        overflow: 'none'
      },
      levels: [
        {
          level: 1,
          levelIsConstant: false
        },
        {
          level: 2,
          colorByPoint: true
        },
        {
          level: 3,
          colorVariation: {
            key: 'brightness',
            to: -0.5
          }
        },
        {
          level: 4,
          colorVariation: {
            key: 'brightness',
            to: 0.5
          }
        },
        {
          collapsed:true,
          level: 4,
          colorVariation: {
            key: 'brightness',
            to: 0.5
          }
        },
        {
          collapsed:true,
          // level: 6,
          // dataLabels: {
          //   x: 10
          // },
          // marker: {
          //   radius: 4
          // }
        }
      ],
      point: {
        events: {
          click: function(event) {
            console.log(event.point.id);
          }
        }
      }
    }
  ],
  credits: {
    // 是否显示版权链接
    enabled: false
}
};

const TreeGraphChart = () => {
  return (
      <HighchartsReact
          highcharts={Highcharts}
          options={options}
      />
  );
};

export default TreeGraphChart;